package com.hnkywl.sts.entity.organ;

import com.hnkywl.sts.entity.cggl.Glfy;
import com.hnkywl.sts.entity.xsgl.Psd;
import org.hibernate.annotations.Cascade;
import org.hibernate.annotations.Where;

import javax.persistence.*;
import java.util.List;

/**
 * 说明：物流商
 * 包:        com.hnkywl.sts.entity.organ
 * 类描述:    物流商
 * 修改备注: [说明本次修改内容]
 * 版本:        [v1.0]
 */
@Entity
@DiscriminatorValue("wls")
public class Wls extends Qyjg{

    /**
     * 运输工具
     */
    @OneToMany(mappedBy = "wls",cascade = CascadeType.ALL,fetch = FetchType.LAZY)
    @Where(clause = "deleted!='1'")
    private List<Ysgj> ysgjList;

    @OneToMany(fetch = FetchType.LAZY, targetEntity = Psd.class)
    @Cascade({org.hibernate.annotations.CascadeType.SAVE_UPDATE})
    @JoinColumn(name = "XSD_ID")
    @Where(clause = "deleted!='1'")
    private List<Psd> psdList;

    private String wlsKmdm;

    public List<Ysgj> getYsgjList() {
        return ysgjList;
    }

    public void setYsgjList(List<Ysgj> ysgjList) {
        this.ysgjList = ysgjList;
    }

    public List<Psd> getPsdList() {
        return psdList;
    }

    public void setPsdList(List<Psd> psdList) {
        this.psdList = psdList;
    }

    public String getWlsKmdm() {
        return wlsKmdm;
    }

    public void setWlsKmdm(String wlsKmdm) {
        this.wlsKmdm = wlsKmdm;
    }
}
